<?php
namespace App\Controllers;
use App\Config\Config;
use App\Database\Database;

/**
 * Created by PhpStorm.
 * User: super
 * Date: 2018/3/19
 * Time: 下午10:03
 */
class HomeController
{
    protected $config;

    protected $database;

    public function __construct(Config $config, Database $database)
    {
        $this->config = $config;

        $this->database = $database;
    }

    public function index()
    {
        return [
            $this->config->get('app.name'),
            $this->database->connect(),
        ];
    }
}